/*
 * 项目名称:    wms-server-jeecg
 * 创建人员:    hansen
 * 创建时间:    2023-11-27
 */
package org.jeecg.modules.dock.entity.mes.request;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.jeecg.modules.utils.DockContentUtil;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.List;

/**
 * MES-WMS查询库存
 *
 * @author hansen
 * @version 1.0.0
 * @date 2023-11-27 13:24:32
 */
@ApiModel(value = "MES-WMS查询库存", description = "MES-WMS查询库存")
@Data
public class CheckInventoryRequestVO {
    /**
     * 仓库编码
     */
    @NotBlank
    @NotNull
    @ApiModelProperty("仓库编码")
    private String warehouseCode;

    @NotNull
    @ApiModelProperty("明细")
    private List<Detail> detail;

    @Data
    public static class Detail implements Serializable {

        @ApiModelProperty("批次号，长度10位")
        private String batchId;

        @ApiModelProperty("物料编号")
        private String materialCode;

        @ApiModelProperty("生产订单号")
        private String orderCode;

        public void setMaterialCode(String materialCode) {
            this.materialCode = DockContentUtil.addZero(materialCode);
        }

    }
}
